package com.jk.controller;

import com.jk.dto.TbSubject;
import com.jk.interfaces.TbSubjectServiceApi;
import com.jk.pojo.PagedResponse;
import com.jk.service.TbSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/11 20:21
 */
@RestController
public class TbSubjectController implements TbSubjectServiceApi {

    @Autowired
    private TbSubjectService tbSubjectService;
    @Override
    public PagedResponse<TbSubject> findSubjectList(TbSubject tbSubject, Integer pageNum, Integer pageSize) {
        return tbSubjectService.findSubjectList(tbSubject, pageNum, pageSize);
    }

    @Override
    public TbSubject getSubjectById(Integer id) {
        return tbSubjectService.getSubjectById(id);
    }

    @Override
    public void delSubjectById(Integer id) {
        tbSubjectService.delSubjectById(id);
    }

    @Override
    public void addSubject(TbSubject tbSubject) {
        tbSubjectService.addSubject(tbSubject);
    }

    @Override
    public void upSubject(TbSubject tbSubject) {
        tbSubjectService.upSubject(tbSubject);
    }
}
